import {actions} from '../base';
import helper from "~/helper";

let url = 'admin/api/config-rune';

export default {
    namespaced: true,
    state: {
        all: helper.getCache('configRune.all', []),
        configs: {

        },
        options: {

        },
        request: {
            all: false,
        }
    },
    mutations: {
        SET_ALL(state, data) {
            state.all = data;
            helper.setCache('configRune.all', state.all)
        },
        SET_REQUESTING(state, name) {
            state.request[name] = true;
        },
        SET_REQUESTED(state, name) {
            state.request[name] = false;
        },
    },
    actions: Object.assign(actions(url), {

    }),
};
